package com.lunago.agent.pojo.entity;

import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.deser.std.FromStringDeserializer;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;

import java.util.Date;

public class PermiumOrder {
    private Integer id;

    private String orderId;

    private Integer orderGemsLevelId;

    private Double amount;

    private Long tonAmount;

    private Date orderTime;

    private Integer status;

    @JsonSerialize(using = ToStringSerializer.class)  // 序列化为 String
    @JsonDeserialize(using = FromStringDeserializer.class)  // 反序列化时转换为 Long
    private Long userId;

    private Date payTime;

    private Integer payType;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getOrderId() {
        return orderId;
    }

    public void setOrderId(String orderId) {
        this.orderId = orderId == null ? null : orderId.trim();
    }

    public Integer getOrderGemsLevelId() {
        return orderGemsLevelId;
    }

    public void setOrderGemsLevelId(Integer orderGemsLevelId) {
        this.orderGemsLevelId = orderGemsLevelId;
    }

    public Double getAmount() {
        return amount;
    }

    public void setAmount(Double amount) {
        this.amount = amount;
    }

    public Long getTonAmount() {
        return tonAmount;
    }

    public void setTonAmount(Long tonAmount) {
        this.tonAmount = tonAmount;
    }

    public Date getOrderTime() {
        return orderTime;
    }

    public void setOrderTime(Date orderTime) {
        this.orderTime = orderTime;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public Date getPayTime() {
        return payTime;
    }

    public void setPayTime(Date payTime) {
        this.payTime = payTime;
    }

    public Integer getPayType() {
        return payType;
    }

    public void setPayType(Integer payType) {
        this.payType = payType;
    }
}